package com.innovation.chengzhangriji.ui.widget;

import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Created by lichuanzhi on 2015/11/24.
 */
public class DiscoverCommentLoadHolder extends RecyclerView.ViewHolder implements View.OnClickListener {

    public static interface OnClickLoadMoreListener {
        public void loadMore();
    }

    public OnClickLoadMoreListener getOnClickLoadMoreListener() {
        return mOnClickLoadMoreListener;
    }

    public void setOnClickLoadMoreListener(OnClickLoadMoreListener onClickLoadMoreListener) {
        mOnClickLoadMoreListener = onClickLoadMoreListener;
    }

    private OnClickLoadMoreListener mOnClickLoadMoreListener;

    public DiscoverCommentLoadHolder(View itemView) {
        super(itemView);
        itemView.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if(mOnClickLoadMoreListener != null) {
            mOnClickLoadMoreListener.loadMore();
        }
    }
}
